<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .tabber {
            position: fixed;
            bottom: 0;
            width: 100%;
            padding: 10px;
            display: flex;
            justify-content: space-around;
            text-align: center;
            line-height: 40px;
            border-top: 1px solid #ccc;
        }

        .tabber .active {
            color: white;
            width: 25%;
            background-color: #ccc;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="tabber">



            <!-- 常用的style方法 如果要添加多个属性 太过冗余  用下面添加active的方式，如果判断后有的添加active属性 在style属性中添加更方便 -->



            <!-- <div class="btn"  v-bind:style="{color:saveindex == index?'red':'',background:saveindex == index?'pink' :''}" @click="Click(index)" v-for="(item,index) in list"> -->
            <div class="btn" :class="{active: saveindex == index }" @click="Click(index)" v-for="(item,index) in list">
                <div class="name">{{item.name}}</div>
            </div>
        </div>
    </div>
</body>

</html>
<script src="vue-2.5.21.js"></script>
<script src="index6-高亮.js"></script>